using System.Configuration;

namespace System.Utility.Helper
{
	public class Config
	{
		public Config()
		{
		}

		public static bool ContainsAppSettings(string key)
		{
			bool length;
			try
			{
				length = GetAppSettings(key).Length > 0;
			}
			catch
			{
				length = false;
			}
			return length;
		}

		public static string GetAppSettings(string key)
		{
			string empty;
			if (!string.IsNullOrEmpty(key))
			{
				string item = ConfigurationManager.AppSettings[key];
				empty = (string.IsNullOrEmpty(item) ? string.Empty : item.Trim());
			}
			else
			{
				empty = string.Empty;
			}
			return empty;
		}
	}
}